<?php


namespace app\api\controller\service;


use app\common\controller\Api;

class Aboutus extends Api
{
    protected $noNeedLogin = ['*'];

    public function introduce()
    {
        $model = new \app\admin\model\service\info\Aboutus();
        $list = $model->column('id,title,image,content');

        $res= [];
        if($list) {
            foreach($list as $item){
                $res[$item["title"]][] = $item['content'] ?? "";
            }
            $this->success('信息返回成功',$res);
        }else{
            $this->error('请后台设置');
        }
    }
}